//
//  HUDManager.m
//  UI18_AFNetWork_封装
//
//  Created by dllo on 15/8/31.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "HUDManager.h"
#import "SVProgressHUD.h"
#import "GiFHUD.h"

static MBProgressHUD *progressHUD;

@interface HUDManager ()<UIAlertViewDelegate>

@end
@implementation HUDManager

+ (void)showStatusWithString:(NSString *)string
{
   
    // 获取当前的window
    UIWindow *window = [[UIApplication sharedApplication].windows objectAtIndex:0];
    
    // 显示在当前的window上
     progressHUD = [MBProgressHUD showHUDAddedTo:window animated:YES];
    // 显示标题
    progressHUD.labelText = string;
    // HUD类型
    progressHUD.mode = MBProgressHUDModeIndeterminate;
    progressHUD.animationType = MBProgressHUDAnimationZoom;
    // 背景
    progressHUD.dimBackground = NO;

}
+ (void)closeHUD
{

    [progressHUD hide:YES];
}


+ (void)showStatus
{
    [GiFHUD setGifWithImageName:@"dongtai.gif"];
    [GiFHUD show];
}
+ (void)dismissHUD
{
    [GiFHUD dismiss];
}

@end
